package com.fang.common.exception;

import com.fang.common.common.ResultCode;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * @author Bernie_fang
 * @Description:
 * @create 2024/10/4 17:38
 **/
@Data
@EqualsAndHashCode(callSuper = true)
public class NetworkDiskException extends RuntimeException {

    private ResultCode resultCodeMsg;

    public NetworkDiskException(ResultCode errorCode) {
        super(errorCode.getMessage());
        this.resultCodeMsg = errorCode;
    }

    public NetworkDiskException(String message) {
        super(message);
    }

    public NetworkDiskException(Throwable cause) {
        super(cause);
    }

    public NetworkDiskException(String message, Throwable cause) {
        super(message, cause);
    }

    public String getErrorCode() {
        return resultCodeMsg.getCode();
    }


}
